<template>
    <div class="w-[100%] h-full leftunity">
      <div class="w-full h-full" v-if="useDataDashboardThemeStore.dataDashboardIsHidden==1 || useDataDashboardThemeStore.dataDashboardType!==2">
        <component :key="rightkey" :is="activemenu.componentleft"></component>
      </div>
      <div class="w-full h-full relative" v-else>
        <buildingdetails :buildingId="3"/>
      </div>
    </div>
  </template>
  <script lang="ts" setup>
  import buildingdetails from "./component/building-details.vue"
  import { useDataDashboardThemeStoreHook } from '@/store/modules/data-dashboard-theme'
  const useDataDashboardThemeStore = useDataDashboardThemeStoreHook()
   const props=defineProps({
    activemenu:{
       type:Object,
       default:()=>{
         return {}
       }
     }
   })
   const rightkey=ref(0)
   watch(
    ()=>props.activemenu,
    (newval)=>{
      rightkey.value++
    },
   { immediate:true,
    deep:true}
   )
  </script>
